<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        const loadApplication = async (name) => {
            return new Promise((resolve, reject) => {
                setTimeout(() => {
                    debugger
                    resolve('我爱你');
                }, 1000);
            });
        };


        // 一个普通的promise 函数
        function promiseFn() {
            return Promise.resolve(loadApplication()).then(() => {
                debugger
                return loadApplication().then(() => {
                    debugger
                    return '深度学习';
                })
            }).then((res) => {
                debugger
                console.log(res); // 深度学习
            });
        }

        promiseFn().then((res) => {
            debugger
            console.log(res); // 深度学习
        });

    </script>

</body>

</html>